<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Caffe: include/caffe/layers/softmax_loss_layer.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Caffe
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4b7f3da7c7b4301d805dae0326fb91b7.html">caffe</a></li><li class="navelem"><a class="el" href="dir_b9606a76d4acbf8f90a06a4a51ec8b9e.html">layers</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">softmax_loss_layer.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CAFFE_SOFTMAX_WITH_LOSS_LAYER_HPP_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CAFFE_SOFTMAX_WITH_LOSS_LAYER_HPP_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;caffe/blob.hpp&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;caffe/layer.hpp&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;caffe/proto/caffe.pb.h&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;caffe/layers/loss_layer.hpp&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;caffe/layers/softmax_layer.hpp&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecaffe.html">caffe</a> {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html">   44</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html">SoftmaxWithLossLayer</a> : <span class="keyword">public</span> <a class="code" href="classcaffe_1_1LossLayer.html">LossLayer</a>&lt;Dtype&gt; {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#ac3a01d6846a9b62c1790635d53185e81">   54</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#ac3a01d6846a9b62c1790635d53185e81">SoftmaxWithLossLayer</a>(<span class="keyword">const</span> LayerParameter&amp; param)</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      : <a class="code" href="classcaffe_1_1LossLayer.html">LossLayer</a>&lt;Dtype&gt;(param) {}</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a96cd04896d4b805fcaf36c2c6522ae10">LayerSetUp</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a2821b89b0f46a5e2ddaccb2708ab237b">Reshape</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a79aad991f6c56097068ccca031f1288a">   61</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a79aad991f6c56097068ccca031f1288a">type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="stringliteral">&quot;SoftmaxWithLoss&quot;</span>; }</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a9035d000b2ce51a973f255a5eb2df8e3">   62</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a9035d000b2ce51a973f255a5eb2df8e3">ExactNumTopBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> -1; }</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a9969336702fb1bbf31750629fb38fb45">   63</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a9969336702fb1bbf31750629fb38fb45">MinTopBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 1; }</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a5a0b4c02fe76ae9087cd8b1b9edd9910">   64</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a5a0b4c02fe76ae9087cd8b1b9edd9910">MaxTopBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 2; }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a093493e6f87ee7a411e4c468b5fa9f9c">Forward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a558fbaaf863070caac03c7566aefdf11">Forward_gpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a39d8b7d59f2c951ac2573827f181284f">Backward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top,</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      <span class="keyword">const</span> vector&lt;bool&gt;&amp; propagate_down, <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#ac6ae6482673cab4933ceb67972f80ee7">Backward_gpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top,</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      <span class="keyword">const</span> vector&lt;bool&gt;&amp; propagate_down, <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="keyword">virtual</span> Dtype <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#aef4567bafcd7b1665f2a2cc71ea02ff4">get_normalizer</a>(</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      LossParameter_NormalizationMode normalization_mode, <span class="keywordtype">int</span> valid_count);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a886b9e8c044917b03e7d2d04e713a05b">  111</a></span>&#160;  shared_ptr&lt;Layer&lt;Dtype&gt; &gt; <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a886b9e8c044917b03e7d2d04e713a05b">softmax_layer_</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a02669f20097006452d877ea05e98b775">  113</a></span>&#160;  <a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a02669f20097006452d877ea05e98b775">prob_</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#aa39f89b673da5e6f86c6b1f79ced1270">  115</a></span>&#160;  vector&lt;Blob&lt;Dtype&gt;*&gt; <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#aa39f89b673da5e6f86c6b1f79ced1270">softmax_bottom_vec_</a>;</div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a0fd219e185b46acce8fd74cb71dabf44">  117</a></span>&#160;  vector&lt;Blob&lt;Dtype&gt;*&gt; <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a0fd219e185b46acce8fd74cb71dabf44">softmax_top_vec_</a>;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#ad77bc32fa576ad025102d29acf79aefb">  119</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#ad77bc32fa576ad025102d29acf79aefb">has_ignore_label_</a>;</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a117d31c7ac538dd7851fb493bfc75d95">  121</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a117d31c7ac538dd7851fb493bfc75d95">ignore_label_</a>;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classcaffe_1_1SoftmaxWithLossLayer.html#a4b1fa348fc885339931f132573467b81">  123</a></span>&#160;  LossParameter_NormalizationMode <a class="code" href="classcaffe_1_1SoftmaxWithLossLayer.html#a4b1fa348fc885339931f132573467b81">normalization_</a>;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keywordtype">int</span> softmax_axis_, outer_num_, inner_num_;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;};</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;}  <span class="comment">// namespace caffe</span></div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#endif  // CAFFE_SOFTMAX_WITH_LOSS_LAYER_HPP_</span></div><div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_ac6ae6482673cab4933ceb67972f80ee7"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#ac6ae6482673cab4933ceb67972f80ee7">caffe::SoftmaxWithLossLayer::Backward_gpu</a></div><div class="ttdeci">virtual void Backward_gpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top, const vector&lt; bool &gt; &amp;propagate_down, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom)</div><div class="ttdoc">Using the GPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a093493e6f87ee7a411e4c468b5fa9f9c"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a093493e6f87ee7a411e4c468b5fa9f9c">caffe::SoftmaxWithLossLayer::Forward_cpu</a></div><div class="ttdeci">virtual void Forward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Using the CPU device, compute the layer output. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.cpp:89</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a886b9e8c044917b03e7d2d04e713a05b"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a886b9e8c044917b03e7d2d04e713a05b">caffe::SoftmaxWithLossLayer::softmax_layer_</a></div><div class="ttdeci">shared_ptr&lt; Layer&lt; Dtype &gt; &gt; softmax_layer_</div><div class="ttdoc">The internal SoftmaxLayer used to map predictions to a distribution. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:111</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a9969336702fb1bbf31750629fb38fb45"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a9969336702fb1bbf31750629fb38fb45">caffe::SoftmaxWithLossLayer::MinTopBlobs</a></div><div class="ttdeci">virtual int MinTopBlobs() const</div><div class="ttdoc">Returns the minimum number of top blobs required by the layer, or -1 if no minimum number is required...</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:63</div></div>
<div class="ttc" id="namespacecaffe_html"><div class="ttname"><a href="namespacecaffe.html">caffe</a></div><div class="ttdoc">A layer factory that allows one to register layers. During runtime, registered layers can be called b...</div><div class="ttdef"><b>Definition:</b> blob.hpp:14</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a2821b89b0f46a5e2ddaccb2708ab237b"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a2821b89b0f46a5e2ddaccb2708ab237b">caffe::SoftmaxWithLossLayer::Reshape</a></div><div class="ttdeci">virtual void Reshape(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.cpp:39</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a5a0b4c02fe76ae9087cd8b1b9edd9910"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a5a0b4c02fe76ae9087cd8b1b9edd9910">caffe::SoftmaxWithLossLayer::MaxTopBlobs</a></div><div class="ttdeci">virtual int MaxTopBlobs() const</div><div class="ttdoc">Returns the maximum number of top blobs required by the layer, or -1 if no maximum number is required...</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:64</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a79aad991f6c56097068ccca031f1288a"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a79aad991f6c56097068ccca031f1288a">caffe::SoftmaxWithLossLayer::type</a></div><div class="ttdeci">virtual const char * type() const</div><div class="ttdoc">Returns the layer type. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:61</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_ac3a01d6846a9b62c1790635d53185e81"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#ac3a01d6846a9b62c1790635d53185e81">caffe::SoftmaxWithLossLayer::SoftmaxWithLossLayer</a></div><div class="ttdeci">SoftmaxWithLossLayer(const LayerParameter &amp;param)</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:54</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a0fd219e185b46acce8fd74cb71dabf44"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a0fd219e185b46acce8fd74cb71dabf44">caffe::SoftmaxWithLossLayer::softmax_top_vec_</a></div><div class="ttdeci">vector&lt; Blob&lt; Dtype &gt; * &gt; softmax_top_vec_</div><div class="ttdoc">top vector holder used in call to the underlying SoftmaxLayer::Forward </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:117</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a4b1fa348fc885339931f132573467b81"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a4b1fa348fc885339931f132573467b81">caffe::SoftmaxWithLossLayer::normalization_</a></div><div class="ttdeci">LossParameter_NormalizationMode normalization_</div><div class="ttdoc">How to normalize the output loss. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:123</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html">caffe::SoftmaxWithLossLayer</a></div><div class="ttdoc">Computes the multinomial logistic loss for a one-of-many classification task, passing real-valued pre...</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:44</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_aa39f89b673da5e6f86c6b1f79ced1270"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#aa39f89b673da5e6f86c6b1f79ced1270">caffe::SoftmaxWithLossLayer::softmax_bottom_vec_</a></div><div class="ttdeci">vector&lt; Blob&lt; Dtype &gt; * &gt; softmax_bottom_vec_</div><div class="ttdoc">bottom vector holder used in call to the underlying SoftmaxLayer::Forward </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:115</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a117d31c7ac538dd7851fb493bfc75d95"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a117d31c7ac538dd7851fb493bfc75d95">caffe::SoftmaxWithLossLayer::ignore_label_</a></div><div class="ttdeci">int ignore_label_</div><div class="ttdoc">The label indicating that an instance should be ignored. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:121</div></div>
<div class="ttc" id="classcaffe_1_1LossLayer_html"><div class="ttname"><a href="classcaffe_1_1LossLayer.html">caffe::LossLayer</a></div><div class="ttdoc">An interface for Layers that take two Blobs as input – usually (1) predictions and (2) ground-truth ...</div><div class="ttdef"><b>Definition:</b> loss_layer.hpp:23</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a39d8b7d59f2c951ac2573827f181284f"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a39d8b7d59f2c951ac2573827f181284f">caffe::SoftmaxWithLossLayer::Backward_cpu</a></div><div class="ttdeci">virtual void Backward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top, const vector&lt; bool &gt; &amp;propagate_down, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom)</div><div class="ttdoc">Computes the softmax loss error gradient w.r.t. the predictions. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.cpp:118</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_aef4567bafcd7b1665f2a2cc71ea02ff4"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#aef4567bafcd7b1665f2a2cc71ea02ff4">caffe::SoftmaxWithLossLayer::get_normalizer</a></div><div class="ttdeci">virtual Dtype get_normalizer(LossParameter_NormalizationMode normalization_mode, int valid_count)</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.cpp:59</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a9035d000b2ce51a973f255a5eb2df8e3"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a9035d000b2ce51a973f255a5eb2df8e3">caffe::SoftmaxWithLossLayer::ExactNumTopBlobs</a></div><div class="ttdeci">virtual int ExactNumTopBlobs() const</div><div class="ttdoc">Returns the exact number of top blobs required by the layer, or -1 if no exact number is required...</div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:62</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a02669f20097006452d877ea05e98b775"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a02669f20097006452d877ea05e98b775">caffe::SoftmaxWithLossLayer::prob_</a></div><div class="ttdeci">Blob&lt; Dtype &gt; prob_</div><div class="ttdoc">prob stores the output probability predictions from the SoftmaxLayer. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:113</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a96cd04896d4b805fcaf36c2c6522ae10"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a96cd04896d4b805fcaf36c2c6522ae10">caffe::SoftmaxWithLossLayer::LayerSetUp</a></div><div class="ttdeci">virtual void LayerSetUp(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Does layer-specific setup: your layer should implement this function as well as Reshape. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.cpp:11</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_a558fbaaf863070caac03c7566aefdf11"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#a558fbaaf863070caac03c7566aefdf11">caffe::SoftmaxWithLossLayer::Forward_gpu</a></div><div class="ttdeci">virtual void Forward_gpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Using the GPU device, compute the layer output. Fall back to Forward_cpu() if unavailable. </div></div>
<div class="ttc" id="classcaffe_1_1Blob_html"><div class="ttname"><a href="classcaffe_1_1Blob.html">caffe::Blob</a></div><div class="ttdoc">A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...</div><div class="ttdef"><b>Definition:</b> blob.hpp:24</div></div>
<div class="ttc" id="classcaffe_1_1SoftmaxWithLossLayer_html_ad77bc32fa576ad025102d29acf79aefb"><div class="ttname"><a href="classcaffe_1_1SoftmaxWithLossLayer.html#ad77bc32fa576ad025102d29acf79aefb">caffe::SoftmaxWithLossLayer::has_ignore_label_</a></div><div class="ttdeci">bool has_ignore_label_</div><div class="ttdoc">Whether to ignore instances with a certain label. </div><div class="ttdef"><b>Definition:</b> softmax_loss_layer.hpp:119</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 3 2017 23:11:19 for Caffe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
